﻿using FoosballEye.BLL.Enums;
using System.Collections.Generic;
using System.Configuration;

namespace FoosballEye.BLL.Configuration
{
    public static class ConfigWrapper
    {
        public static int CurrentSeasonId
        {
            get
            {
                return int.Parse(ConfigurationManager.AppSettings["CurrentSeasonId"]);
            }
        }

        public static string SmtpServer
        {
            get
            {
                return ConfigurationManager.AppSettings["SmtpServer"];
            }
        }

        public static string FoosballEyeFromEmail
        {
            get
            {
                return ConfigurationManager.AppSettings["FoosballEyeFromEmail"];
            }
        }

        public static string EmailSpoofingRecepients
        {
            get
            {
                return ConfigurationManager.AppSettings["EmailSpoofingRecepients"];
            }
        }        

        public static SiteType TypeOfSite
        {
            get
            {
                Dictionary<string, SiteType> sites = new Dictionary<string, SiteType>
                    {
                        { "DEV", SiteType.Development },
                        { "QA", SiteType.Test },
                        { "STAGE", SiteType.Stage },
                        { "PROD", SiteType.Prod }
                    };

                return sites[ConfigurationManager.AppSettings["Environment"]];
            }
        }
    }
}
